/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// 歌曲页面
import React from 'react';
import {StyleSheet, View, Text, Image} from 'react-native';

interface ExtraPageProps {
  title: string;
  artist: string;
}

const ExtraPage: React.FC<ExtraPageProps> = ({title, artist}) => {
  return (
    <View style={styles.extra}>
      <View style={styles.extraInner}>
        <Image
          source={require('../../../../asset/artwork.png')}
          style={styles.artworkStyle}
        />
        <View>
          <Text style={styles.titleStyle}>{title}</Text>
          <Text style={styles.artistStyle}>{artist}</Text>
        </View>
      </View>
      <Text style={styles.defortText}>此歌曲为纯音乐，请您欣赏</Text>
    </View>
  );
};

const styles = StyleSheet.create({
  extra: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  extraInner: {
    flexDirection: 'row',
    position: 'absolute',
    height: '70%',
    width: '85%',
  },
  artworkStyle: {
    width: 50,
    height: 50,
    borderRadius: 1,
  },
  titleStyle: {
    fontSize: 16,
    color: '#ffffff',
    margin: 5,
  },
  artistStyle: {
    fontSize: 12,
    color: '#ffffff',
    opacity: 0.4,
    margin: 5,
  },
  defortText: {
    fontSize: 23,
    color: '#ffffff',
  },
});

export default ExtraPage;
